<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">

	<title>RoomEntity Class Reference</title>

	<link rel="stylesheet" href="../css/style.css">
	<meta name="viewport" content="initial-scale=1, maximum-scale=1.4">
	<meta name="generator" content="appledoc 2.2.1 (build 1334)">
</head>
<body class="appledoc">
	<header>
		<div class="container" class="hide-in-xcode">
			
			<h1 id="library-title">
				<a href="../index.html">OBMessenger </a>
			</h1>

			<p id="developer-home">
				<a href="../index.html">On-Bright</a>
			</p>
			
		</div>
	</header>

	<aside>
		<div class="container">
			<nav>
				<ul id="header-buttons" role="toolbar">
					<li><a href="../index.html">Index</a></li>
<li><a href="../hierarchy.html">Hierarchy</a></li>

					<li id="on-this-page" role="navigation">
						<label>
							On This Page

							<div class="chevron">
								<div class="chevy chevron-left"></div>
								<div class="chevy chevron-right"></div>
							</div>

							<select id="jump-to">
	<option value="top">Jump To&#133;</option>
	

	
	
	<option value="tasks">Tasks</option>
	
	

	
	

	
	<optgroup label="Class Methods">
		
		<option value="//api/name/ctlCreateAsName:inBuilding:withImage:handler:">+ ctlCreateAsName:inBuilding:withImage:handler:</option>
		
		<option value="//api/name/ctlGetAllUsingPredicate:">+ ctlGetAllUsingPredicate:</option>
		
		<option value="//api/name/ctlGetPredicateForContainEntity:">+ ctlGetPredicateForContainEntity:</option>
		
		<option value="//api/name/ctlRefresh">+ ctlRefresh</option>
		
	</optgroup>
	

	
	<optgroup label="Instance Methods">
		
		<option value="//api/name/ctlAllEntities">- ctlAllEntities</option>
		
		<option value="//api/name/ctlDelete:">- ctlDelete:</option>
		
		<option value="//api/name/ctlLoadDevicePositions:">- ctlLoadDevicePositions:</option>
		
		<option value="//api/name/ctlModifyIfName:ifBuilding:ifImage:handler:">- ctlModifyIfName:ifBuilding:ifImage:handler:</option>
		
		<option value="//api/name/ctlPositionForEntity:">- ctlPositionForEntity:</option>
		
		<option value="//api/name/ctlRemoveEntity:handler:">- ctlRemoveEntity:handler:</option>
		
		<option value="//api/name/ctlSetPositionForEntity:atPoint:handler:">- ctlSetPositionForEntity:atPoint:handler:</option>
		
	</optgroup>
	
	
</select>
						</label>
					</li>
				</ul>
			</nav>
		</div>
	</aside>

	<article>
		<div id="overview_contents" class="container">
			<div id="content">
				<main role="main">
					<h1 class="title">RoomEntity Class Reference</h1>

					
					<div class="section section-specification"><table cellspacing="0"><tbody>
						<tr>
	<th>Inherits from</th>
	<td>NSObject</td>
</tr><tr>
	<th>Declared in</th>
	<td>OBModel.h</td>
</tr>
						</tbody></table></div>
					

                    

					
					
					<div class="section section-tasks">
						<a title="Tasks" name="tasks"></a>
						

						<a title="OBEntityControl Methods" name="task_OBEntityControl Methods"></a>
						
<h2 class="task-title">OBEntityControl Methods</h2>
						<div class="task-list">
							<div class="section-method">
	<a name="//api/name/ctlGetAllUsingPredicate:" title="ctlGetAllUsingPredicate:"></a>
	<h3 class="method-title"><code><a href="#//api/name/ctlGetAllUsingPredicate:">+&nbsp;ctlGetAllUsingPredicate:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>get roomEntities from <a href="../Classes/OBModel.html">OBModel</a> Using Predicate.</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>+ (nullable NSSet *)ctlGetAllUsingPredicate:(nullable NSArray&lt;NSPredicate*&gt; *)<em>predicates</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>predicates</code></th>
						<td><p>filtered predicate array if have</p></td>
					</tr>
				
				</table>
			</div>
			

			
			<div class="method-subsection return">
				<h4 class="method-subtitle parameter-title">Return Value</h4>
				<p>entitySet after using predicates if have</p>
			</div>
			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">OBEntityControl.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/ctlGetPredicateForContainEntity:" title="ctlGetPredicateForContainEntity:"></a>
	<h3 class="method-title"><code><a href="#//api/name/ctlGetPredicateForContainEntity:">+&nbsp;ctlGetPredicateForContainEntity:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>Predicate by any entity contained (device, group, obox, scene).</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>+ (nonnull NSPredicate *)ctlGetPredicateForContainEntity:(nonnull id)<em>anyEntity</em></code></div>

		    
			

			
			<div class="method-subsection return">
				<h4 class="method-subtitle parameter-title">Return Value</h4>
				<p>NSPredicate Predicate object for filtered.</p>
			</div>
			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">OBEntityControl.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/ctlRefresh" title="ctlRefresh"></a>
	<h3 class="method-title"><code><a href="#//api/name/ctlRefresh">+&nbsp;ctlRefresh</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>called [OBManager loadEntityData:OBM_Room]  to reload(auto remove all) Room data</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>+ (void)ctlRefresh</code></div>

		    
			

			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">OBEntityControl.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/ctlCreateAsName:inBuilding:withImage:handler:" title="ctlCreateAsName:inBuilding:withImage:handler:"></a>
	<h3 class="method-title"><code><a href="#//api/name/ctlCreateAsName:inBuilding:withImage:handler:">+&nbsp;ctlCreateAsName:inBuilding:withImage:handler:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>make a room called - <a href="../Classes/OBServer.html#//api/name/setRoomLocation:withBuilding:andImageData:">[OBServer setRoomLocation:withBuilding:andImageData:]</a></p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>+ (void)ctlCreateAsName:(nonnull NSString *)<em>roomName</em> inBuilding:(nullable NSString *)<em>buildingName</em> withImage:(nonnull UIImage *)<em>roomImage</em> handler:(nullable CtlResultBlock)<em>inHandler</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>roomName</code></th>
						<td><p>name for room</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>buildingName</code></th>
						<td><p>building of room belongs if have</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>roomImage</code></th>
						<td><p>image of room to upload</p></td>
					</tr>
				
				</table>
			</div>
			

			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">OBEntityControl.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/ctlDelete:" title="ctlDelete:"></a>
	<h3 class="method-title"><code><a href="#//api/name/ctlDelete:">&ndash;&nbsp;ctlDelete:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>delete room return result block called - [OBServer modifyRoomLocation:isdelete:YES&hellip;]</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (void)ctlDelete:(nullable CtlResultBlock)<em>inHandler</em></code></div>

		    
			

			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">OBEntityControl.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/ctlModifyIfName:ifBuilding:ifImage:handler:" title="ctlModifyIfName:ifBuilding:ifImage:handler:"></a>
	<h3 class="method-title"><code><a href="#//api/name/ctlModifyIfName:ifBuilding:ifImage:handler:">&ndash;&nbsp;ctlModifyIfName:ifBuilding:ifImage:handler:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>modify room info called - <a href="../Classes/OBServer.html#//api/name/modifyRoomLocation:isdelete:withLocation:withBuilding:andImageData:">[OBServer modifyRoomLocation:isdelete:withLocation:withBuilding:andImageData:]</a></p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (void)ctlModifyIfName:(nullable NSString *)<em>newName</em> ifBuilding:(nullable NSString *)<em>newBuilding</em> ifImage:(nullable UIImage *)<em>newImage</em> handler:(nullable CtlResultBlock)<em>inHandler</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>newName</code></th>
						<td><p>rename if need</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>newBuilding</code></th>
						<td><p>modify building name if need</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>newImage</code></th>
						<td><p>modify room image if need</p></td>
					</tr>
				
				</table>
			</div>
			

			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">OBEntityControl.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/ctlLoadDevicePositions:" title="ctlLoadDevicePositions:"></a>
	<h3 class="method-title"><code><a href="#//api/name/ctlLoadDevicePositions:">&ndash;&nbsp;ctlLoadDevicePositions:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>reload device obox or scene etc. position info.
called - <a href="../Classes/OBServer.html#//api/name/queryDeviceLocationOfRoom:">[OBServer queryDeviceLocationOfRoom:]</a>
will auto set [roomEntity devicesInRoom] with handler to access new data</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (void)ctlLoadDevicePositions:(nullable CtlResultBlock)<em>inHandler</em></code></div>

		    
			

			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">OBEntityControl.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/ctlAllEntities" title="ctlAllEntities"></a>
	<h3 class="method-title"><code><a href="#//api/name/ctlAllEntities">&ndash;&nbsp;ctlAllEntities</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>get all entities (device, obox, scene etc.)</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (nullable NSSet *)ctlAllEntities</code></div>

		    
			

			
			<div class="method-subsection return">
				<h4 class="method-subtitle parameter-title">Return Value</h4>
				<p>entities set (Please using NSPredicate to filter by <code>isMemberOfClass:</code>)</p>
			</div>
			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">OBEntityControl.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/ctlPositionForEntity:" title="ctlPositionForEntity:"></a>
	<h3 class="method-title"><code><a href="#//api/name/ctlPositionForEntity:">&ndash;&nbsp;ctlPositionForEntity:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>get position point of entity in room</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (CGPoint)ctlPositionForEntity:(nonnull id)<em>entity</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>entity</code></th>
						<td><p>entity to query position</p></td>
					</tr>
				
				</table>
			</div>
			

			
			<div class="method-subsection return">
				<h4 class="method-subtitle parameter-title">Return Value</h4>
				<p>point of entity position if have, or (-1, -1) for not include, or (0, 0) for not show in view</p>
			</div>
			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">OBEntityControl.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/ctlRemoveEntity:handler:" title="ctlRemoveEntity:handler:"></a>
	<h3 class="method-title"><code><a href="#//api/name/ctlRemoveEntity:handler:">&ndash;&nbsp;ctlRemoveEntity:handler:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>move entity out of room</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (void)ctlRemoveEntity:(nonnull id)<em>entity</em> handler:(nullable CtlResultBlock)<em>inHandler</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>entity</code></th>
						<td><p>entity to move out</p></td>
					</tr>
				
				</table>
			</div>
			

			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">OBEntityControl.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/ctlSetPositionForEntity:atPoint:handler:" title="ctlSetPositionForEntity:atPoint:handler:"></a>
	<h3 class="method-title"><code><a href="#//api/name/ctlSetPositionForEntity:atPoint:handler:">&ndash;&nbsp;ctlSetPositionForEntity:atPoint:handler:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>set entity position</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (void)ctlSetPositionForEntity:(nonnull id)<em>entity</em> atPoint:(CGPoint)<em>positionPoint</em> handler:(nullable CtlResultBlock)<em>inHandler</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>entity</code></th>
						<td><p>entity to set position</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>positionPoint</code></th>
						<td><p>position point of entity, if (0,0) will just add to room, but not show in view</p></td>
					</tr>
				
				</table>
			</div>
			

			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">OBEntityControl.h</code></p>
			</div>
			
			
		</div>
	</div>
</div>
						</div>
						
					</div>
					
					

                    
                    
          
				</main>

				<footer>
					<div class="footer-copyright">
						
						<p class="copyright">Copyright &copy; 2017 On-Bright. All rights reserved. Updated: 2017-06-09</p>
						
						
						<p class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2.1 (build 1334)</a>.</p>
						
					</div>
				</footer>
			</div>
		</div>
	</article>

	<script src="../js/script.js"></script>
</body>
</html>